ARCursor
Members
A cursor that represents a player's mouse in the 3D world. For use with AR devices.
Camera
The camera of the player associated with the mouse.
It is of the type ARCamera
.
Hit
The CFrame
the user's mouse is located at.
It is of the type CFrame
.
MouseDelta
The current change in position of the mouse for the frame that was sent.
It is of the type Vector2
.
Origin
A CFrame indicating where the mouse originated from. It is positioned at the camera and oriented toward the mouse's 3D position.
It is of the type Vector3
.
Player
The name of the player the cursor is for.
It is of the type string
.
Pressed
A boolean for whether or not the mouse button is pressed.
It is of the type boolean
.
ScreenPosition
The XY screen position of the mouse cursor.
It is of the type Vector2
.
Target
The PartObject that is being hovered over. You can call methods on this part!
It is of the type PilotObject
.
UnitRay
A Ray directed toward the mouse's position in 3D space. It originates from the CFrame of the camera. Like all unit rays, it has a magnitude of 1.
It is of the type Ray
.
UserCFrames
Contains Head
, LeftHand
, and RightHand
CFrame
s for VR.
Head
It is of the type CFrame
.
LeftHand
It is of the type CFrame
.
RightHand
It is of the type CFrame
.
UserId
The user ID of the player.
It is of the type number
.
UserInput
A table of input data (would suggest printing with repr) - Contains Mouse, Keyboard, Gamepad, VREnabled, KeyboardEnabled, TouchEnabled, GamepadEnabled, and LastInputType.
It is of the type ARInput
.
VirtualTarget
The hovered part in the virtual 3D space.
It is of the type BasePart
.
VirtualWorldPosition
The world position of the mouse cursor in the virtual 3D space.
It is of the type Vector3
.
WorldPosition
The world position of the mouse cursor.
It is of the type Vector3
.
X
The X
position of the cursor on the screen.
It is of the type number
.
Y
The Y
position of the cursor on the screen.
It is of the type number
.
Luau Type
This is the luau type for ARCursor
. It may help clear up mistranslations from the raw data to the wiki page (as it is an automatic process).
export type ARCursor = {
WorldPosition: Vector3,
Origin: Vector3,
UserId: number,
Target: PilotObject,
Pressed: boolean,
UnitRay: Ray,
Camera: ARCamera,
ScreenPosition: Vector2,
UserCFrames: {
RightHand: CFrame,
LeftHand: CFrame,
Head: CFrame,
},
Y: number,
Player: string,
VirtualWorldPosition: Vector3,
Hit: CFrame,
X: number,
VirtualTarget: BasePart,
MouseDelta: Vector2,
UserInput: ARInput,
}